1. Field of the Invention
The present invention relates to an image processing apparatus, a control method therefor and a program.
2. Description of the Related Art
Image processing apparatuses, such as copy machines, facsimile machines and laser printers, execute image processing such as rotation, enlargement/reduction and edge enhancement of input images by storing input image data line by line in a line memory and performing the rotation, various types of filtering, and the like on the lines of stored data. Accordingly, image processing apparatuses generally include an image processing unit having a rotation unit, a filtering unit and the like for page memory and image processing/editing usage. For example, when rotating an input image, an input image for which pixel data has been sequentially written and stored in a predetermined order in a page memory is sequentially read according to the angle and direction in which it is to be rotated. Such image rotation processing is implemented by controlling addresses in a line readout unit. However, implementation of such rotation processing requires a huge page memory that can handle the size of an entire page. Furthermore, with the recent trend toward increased resolution, the memory capacity required for the page memory is increasing, causing cost increases.
As a solution for the above-described problem, a technique has been proposed in which an input page image is divided into tile images and defined in a corresponding data format, and rotation processing or the like is executed on the tile images. In this case, the only memory capacity that is required is one that can handle a divided tile image as the “page” memory used in the rotation processing. Thus more efficient use of memory is possible. However, image processing other than rotation, such as enlargement/reduction or edge enhancement, requires processing of peripheral pixels surrounding a pixel of interest when executing the image processing. Accordingly, if a pixel located on the boundary between tile images is the pixel of interest, for example, calculation cannot be performed with a single tile image. In other words, in order to perform calculation using the peripheral pixels in the case where the pixel of interest is a pixel located on the boundary between tile images, it is necessary to provide a further band memory with a capacity corresponding to the size of the filter calculation, which remains a cause of cost increase especially when attempting to achieve increased resolution.
As a solution for such calculation that refers to peripheral pixels, Japanese Patent Laid-Open No. 2005-198121 proposes a technique in which regions are overlapped when dividing an original image into tile images, so that a pixel of interest located in the vicinity of the boundary can refer to the peripheral pixels of the tile, or of a neighboring tile for processing. It is therefore possible to implement appropriate processing by referring to the pixels of the overlapping region and performing a filter calculation, without requiring a line memory for storing extra peripheral pixels.
However, because this conventional technique adds overlapping regions when dividing an image into tile images, the amount of data of each tile image will be the sum of the amount of image data of the region excluding the overlapping region and the amount of image data of the overlapping region. For example, in the case where a tile image includes 16×16 pixels (256 pixels) and two pixels' worth of peripheral pixels are added in each of the directions, the total amount of data will be 20×20 pixels (400 pixels). In this case, when reading out such tile images, the (buffer) memory is required to have a throughput (required bandwidth) approximately 1.5 times higher than when reading out the amount of data of tile images when overlapping regions are not added.
In addition, whether or not overlapping image data is necessary depends on the content of the image processing. However, in conventional image data formats, tile image data and overlapping image data are combined and compressed, and therefore it is not possible to separate unnecessary overlapping image data. It is possible to separate tile image data and overlapping image data when uncompressed image data is used, but the amount of data per pixel increases as compared to compressed data. Furthermore, when the possible throughput of the system is less than the level required, increased frequency, increased bus width and the like are required as (buffer) memory specifications, causing a further increase in memory cost.